package com.tgu.home_action.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

@Data
@ApiModel
public class Banner {
    public interface insert {
    }

    public interface update {
    }

    @NotNull(message = "id不能为空", groups = {update.class})
    @ApiModelProperty("ID")
    private Integer id;
    @NotNull(message = "url不能为空", groups = {insert.class})
    @ApiModelProperty("图片地址")
    private String url;
    @NotNull(message = "noticeId不能为空", groups = {insert.class})
    @ApiModelProperty("公告ID")
    private Integer noticeId;
    @ApiModelProperty("公告标题")
    private String title;
    @ApiModelProperty("公告描述")
    private String description;
    @ApiModelProperty("发布人")
    private String publisher;
    @ApiModelProperty(value = "Banner生成时间", dataType = "java.sql.Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp time;
//    @JsonIgnore
    private Integer roleId;


}
